package com.cyy.AI_mbti.config;

import com.zhipu.oapi.ClientV4;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(prefix = "ai")
@Data
//AI 配置
public class AIConfig {

    private String key;
    @Bean
    public ClientV4 getClient(){
        return new ClientV4.Builder(key).build();
    }

}
